/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mii.ejb.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Temporal;

/**
 *
 * @author TEKNISI
 */
@Entity
public class Engineer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String kodeEng;
    private String nameEng;
    private String solusiEng;
    private String tindakanEng;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date startEng;
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date finishEng;
    @OneToMany(mappedBy = "engineer")
    private List<Complain> complain;
     

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Engineer)) {
            return false;
        }
        Engineer other = (Engineer) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "mii.ejb.entity.Engineer[ id=" + id + " ]";
    }

    /**
     * @return the kodeEng
     */
    public String getKodeEng() {
        return kodeEng;
    }

    /**
     * @param kodeEng the kodeEng to set
     */
    public void setKodeEng(String kodeEng) {
        this.kodeEng = kodeEng;
    }

    /**
     * @return the nameEng
     */
    public String getNameEng() {
        return nameEng;
    }

    /**
     * @param nameEng the nameEng to set
     */
    public void setNameEng(String nameEng) {
        this.nameEng = nameEng;
    }

    /**
     * @return the solusiEng
     */
    public String getSolusiEng() {
        return solusiEng;
    }

    /**
     * @param solusiEng the solusiEng to set
     */
    public void setSolusiEng(String solusiEng) {
        this.solusiEng = solusiEng;
    }

    /**
     * @return the tindakanEng
     */
    public String getTindakanEng() {
        return tindakanEng;
    }

    /**
     * @param tindakanEng the tindakanEng to set
     */
    public void setTindakanEng(String tindakanEng) {
        this.tindakanEng = tindakanEng;
    }

    /**
     * @return the startEng
     */
    public Date getStartEng() {
        return startEng;
    }

    /**
     * @param startEng the startEng to set
     */
    public void setStartEng(Date startEng) {
        this.startEng = startEng;
    }

    /**
     * @return the finishEng
     */
    public Date getFinishEng() {
        return finishEng;
    }

    /**
     * @param finishEng the finishEng to set
     */
    public void setFinishEng(Date finishEng) {
        this.finishEng = finishEng;
    }

    /**
     * @return the complain
     */
    public List<Complain> getComplain() {
        return complain;
    }

    /**
     * @param complain the complain to set
     */
    public void setComplain(List<Complain> complain) {
        this.complain = complain;
    }
    
}
